package com.example.houduan.Controller;

import com.example.houduan.Pojo.Permission;
import com.example.houduan.Service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@CrossOrigin
public class PermissionController {

    @Autowired
    PermissionService permissionService;

    @RequestMapping("/getAllPermission")
    @ResponseBody
    public List<Permission> getAllPermission(){
        return permissionService.getAllPermisson();
    }

}
